package service;

import vo.*;

import java.sql.SQLException;
import java.util.List;

public interface IOrderService {
//    void addOrder(Order order) throws SQLException;
//
//    PageBean<Order> findOrder(User user, Integer currPage) throws Exception;
//
//    Order findByOid(String oid) throws Exception;
//
//    void updateOrder(Order order) throws Exception;
//
//    PageBean<Order> findAllOrder(Integer currPage) throws Exception;
//
//    PageBean<Order> findByState(int pstate, Integer currPage) throws Exception;
//
//    void setState(String oid, Integer state) throws SQLException;

    List<OrderLine> addOrder(List<CartLine>cartLines, int userId);

    double totalPrice(List<OrderLine> orderLines);

    List<Order> selectOrdersByUserId(int userId);

    Order getOrderById(int id);
}
